/*
 * @Description  : 地图
 * @Author       : zhao
 * @Date         : 2022-10-19 14:21:57
 * @LastEditors  : zhao
 * @LastEditTime : 2022-11-03 16:20:46
 */
const keepAliveNamesModule = {
    namespaced: true,
    state: {
        map: null,//地图实例
        mapData: {//地图渲染数据
            center: [116.394926, 39.9125],
            zoom: 10,
        },
        lineData: [],//线数组
        // key: '9c70b9de519e9bb6c44f648c4a339d8c',//天地图key
        // key: '5304b281f51f4b2c496d684581fd2a81',//天地图key
        // key: 'a60e2dfc885dd214e83732c88ecde3f8',//天地图key
        key: '1a5730b8462863577d91f4c0a1a06ddc',//天地图key
    },
    mutations: {
        // 设置路由缓存（name字段）
        getCacheKeepAlive(state, data) {
            state.keepAliveNames = data;
        },

    },
    actions: {
        // 设置路由缓存（name字段）
        async setCacheKeepAlive({ commit }, data) {
            commit('getCacheKeepAlive', data);
        },

    },
    getter: {
        getKey({ state }) {
            return state.key
        }
    }
};

export default keepAliveNamesModule;